package ThreadDemo;

public class ThreadDemo13 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(){
          @Override
          public void run() {
              for(int i=0;i<1_0000_0000L;i++){

              }
          }
        };


        System.out.println("线程启动前"+t.getState());
        t.start();
        while(t.isAlive()){
            System.out.println("线程启动后"+t.getState());
            Thread.sleep(1);
        }
        System.out.println("线程结束后"+t.getState());
    }
}
